package org.dromara.llm.domain.bo;

import org.dromara.llm.domain.SysMessage;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 人与AI对话消息业务对象 sys_message
 *
 * @author Miles Meng
 * @date 2025-06-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysMessage.class, reverseConvertGenerate = false)
public class SysMessageBo extends BaseEntity {

    /**
     * 消息ID，主键，自增
     */
    @NotNull(message = "消息ID，主键i", groups = { EditGroup.class })
    private Long id;

    /**
     * 设备ID
     */
    @NotBlank(message = "设备ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceId;

    /**
     * 会话ID
     */
    @NotBlank(message = "会话ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sessionId;

    /**
     * 消息发送方：user-用户，assistant-人工智能
     */
    @NotBlank(message = "消息发送方：user-用户，assistant-人工智能不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sender;

    /**
     * AI扮演的角色ID
     */
    private Long roleId;

    /**
     * 消息内容
     */
    private String message;

    /**
     * 消息类型
     */
    private String messageType;

    /**
     * 语音文件路径
     */
    private String audioPath;

    /**
     * 状态：1-有效，0-删除
     */
    private String state;


}
